﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Core.API.Entity
{
    public class RespBaseModel
    {
        #region 是否成功
        /// <summary>
        /// 是否成功
        /// </summary> 
        public bool IsOK { get; set; }
        #endregion

        #region 错误码
        /// <summary>
        /// 错误码
        /// </summary> 
        public int ErrorCode { get; set; }
        #endregion

        #region 消息内容
        /// <summary>
        /// 消息内容
        /// </summary> 
        public string Message { get; set; }

        public RespBaseModel(bool isOK, int errorCode, string msg)
        {
            IsOK = isOK;
            ErrorCode = errorCode;
            Message = msg;
        }

        public RespBaseModel()
        {
            IsOK = false;
            ErrorCode = 500;
            Message = "服务器异常，请重试";
        }
        #endregion
    }
}
